package xwj.example.demo.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Convert;
import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
@TableName("user")
public class User {
    @TableId("name")
    private String name;
    @TableField("password")
    private String password;

    @TableField("authorities")
    @Convert(converter = StringListConverter.class)
    private List<String> authorities=new ArrayList<>();
   // private List<Role> roleList=new ArrayList<>();
}
